﻿
    using Chain.BLL;
    using Chain.Model;
    using System;
    using System.Text.RegularExpressions;
    using System.Web.UI;
    using System.Web.UI.HtmlControls;

    public partial class personalinfo : Page
    {

        private Chain.BLL.Mem MemBll = new Chain.BLL.Mem();
  

        protected void Page_Load(object sender, EventArgs e)
        {
            if ((base.Request.Cookies["uid"] != null) && Regex.IsMatch(base.Request.Cookies["uid"].Value, @"^\d+$"))
            {
                int MemID = Convert.ToInt32(base.Request.Cookies["uid"].Value);
                Chain.Model.Mem MemModel = this.MemBll.GetModel(MemID);
                this.memname.Value = MemModel.MemName;
                this.memgender.Value = MemModel.MemSex ? "1" : "0";
                this.membirthday.Value = (MemModel.MemBirthday.ToString("yyyy-MM-dd") == "1900-01-01") ? "" : MemModel.MemBirthday.ToString("yyyy-MM-dd");
                this.telnumber.Value = MemModel.MemMobile;
                this.mail.Value = MemModel.MemEmail;
                this.address.Value = MemModel.MemAddress;
            }
        }
    }


